/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mazewar;

import mazewar.synchronization.LamportClock;

/**
 *
 * @author jillsanluis
 */
public class Examples {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        sampleLamportClock();

    }

    private static void sampleLamportClock(){

        System.out.println("Sample Lamport Clock");

        LamportClock lc = new LamportClock(1987);
        LamportClock lcOther1 = new LamportClock(1988);

        lc.updateTimeStamp(lcOther1);
        LamportClock updateCopy1 = lc.clone();
        
        LamportClock lcOther2  = new LamportClock(1989);
        lcOther2.incrementTimeStamp();
        lc.updateTimeStamp(lcOther2);

        LamportClock updateCopy2 = lc.clone();


        System.out.println("copy 1 " + updateCopy1.getTimeStamp());
        System.out.println("copy 2 " + updateCopy2.getTimeStamp());
        System.out.println("current " + lc.getTimeStamp());

        
    }
}
